.class public Lcom/brixd/niceapp/community/CommunityAppGridFragment;
.super Lcom/brixd/niceapp/community/CommunityAppBaseFragment;
.source "CommunityAppGridFragment.java"


# instance fields
.field private mAppModelCaches:Ljava/util/HashMap;
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "UseSparseArrays"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Integer;",
            "Ljava/lang/ref/SoftReference",
            "<",
            "Lcom/brixd/niceapp/model/AppModel;",
            ">;>;"
        }
    .end annotation
.end field

.field private mCommunityAppModelCaches:Ljava/util/HashMap;
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "UseSparseArrays"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Integer;",
            "Ljava/lang/ref/SoftReference",
            "<",
            "Lcom/brixd/niceapp/community/model/CommunityAppModel;",
            ">;>;"
        }
    .end annotation
.end field

.field private mPullToRefreshGridView:Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 34
    invoke-direct {p0}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;-><init>()V

    .line 36
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mAppModelCaches:Ljava/util/HashMap;

    .line 38
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mCommunityAppModelCaches:Ljava/util/HashMap;

    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/community/CommunityAppGridFragment;Lcom/brixd/niceapp/community/model/CommunityAppModel;I)V
    .registers 3
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityAppGridFragment;
    .param p1, "x1"    # Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .param p2, "x2"    # I

    .prologue
    .line 34
    invoke-direct {p0, p1, p2}, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->requestDailyDetail(Lcom/brixd/niceapp/community/model/CommunityAppModel;I)V

    return-void
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/community/CommunityAppGridFragment;Lcom/brixd/niceapp/community/model/CommunityAppModel;I)V
    .registers 3
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityAppGridFragment;
    .param p1, "x1"    # Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .param p2, "x2"    # I

    .prologue
    .line 34
    invoke-direct {p0, p1, p2}, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->requestCommunityDetail(Lcom/brixd/niceapp/community/model/CommunityAppModel;I)V

    return-void
.end method

.method static synthetic access$200(Lcom/brixd/niceapp/community/CommunityAppGridFragment;)Landroid/os/Handler;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityAppGridFragment;

    .prologue
    .line 34
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$300(Lcom/brixd/niceapp/community/CommunityAppGridFragment;)Landroid/os/Handler;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityAppGridFragment;

    .prologue
    .line 34
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method public static getInstance(Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;)Lcom/brixd/niceapp/community/CommunityAppGridFragment;
    .registers 5
    .param p0, "type"    # Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    .prologue
    .line 44
    new-instance v1, Lcom/brixd/niceapp/community/CommunityAppGridFragment;

    invoke-direct {v1}, Lcom/brixd/niceapp/community/CommunityAppGridFragment;-><init>()V

    .line 45
    .local v1, "fragment":Lcom/brixd/niceapp/community/CommunityAppGridFragment;
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 46
    .local v0, "extra":Landroid/os/Bundle;
    const-string v2, "Type"

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v3

    invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 47
    invoke-virtual {v1, v0}, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->setArguments(Landroid/os/Bundle;)V

    .line 48
    return-object v1
.end method

.method private requestCommunityDetail(Lcom/brixd/niceapp/community/model/CommunityAppModel;I)V
    .registers 6
    .param p1, "model"    # Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .param p2, "position"    # I

    .prologue
    .line 209
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->showDialog()V

    .line 210
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v1

    new-instance v2, Lcom/brixd/niceapp/community/CommunityAppGridFragment$3;

    invoke-direct {v2, p0, p2}, Lcom/brixd/niceapp/community/CommunityAppGridFragment$3;-><init>(Lcom/brixd/niceapp/community/CommunityAppGridFragment;I)V

    invoke-interface {v0, v1, v2}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->queryCommunityDetail(ILretrofit/Callback;)V

    .line 238
    return-void
.end method

.method private requestDailyDetail(Lcom/brixd/niceapp/community/model/CommunityAppModel;I)V
    .registers 6
    .param p1, "model"    # Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .param p2, "position"    # I

    .prologue
    .line 147
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->showDialog()V

    .line 148
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mRequest:Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v1

    new-instance v2, Lcom/brixd/niceapp/community/CommunityAppGridFragment$2;

    invoke-direct {v2, p0, p2}, Lcom/brixd/niceapp/community/CommunityAppGridFragment$2;-><init>(Lcom/brixd/niceapp/community/CommunityAppGridFragment;I)V

    invoke-interface {v0, v1, v2}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->queryDetail(ILretrofit/Callback;)V

    .line 187
    return-void
.end method


# virtual methods
.method public getFragmentTitle()Ljava/lang/String;
    .registers 2

    .prologue
    .line 127
    const-string v0, ""

    return-object v0
.end method

.method protected initActions(Landroid/view/View;)V
    .registers 4
    .param p1, "fragmentView"    # Landroid/view/View;

    .prologue
    .line 102
    invoke-super {p0, p1}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;->initActions(Landroid/view/View;)V

    .line 104
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mPullToRefreshGridView:Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;

    new-instance v1, Lcom/brixd/niceapp/community/CommunityAppGridFragment$1;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/CommunityAppGridFragment$1;-><init>(Lcom/brixd/niceapp/community/CommunityAppGridFragment;)V

    invoke-virtual {v0, v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 116
    return-void
.end method

.method protected initData()V
    .registers 4

    .prologue
    .line 65
    invoke-super {p0}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;->initData()V

    .line 66
    new-instance v0, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    iget-object v2, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mAppModels:Ljava/util/ArrayList;

    invoke-direct {v0, v1, v2}, Lcom/brixd/niceapp/community/adapter/CommunityFavAppAdapter;-><init>(Landroid/content/Context;Ljava/util/List;)V

    iput-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mAdapter:Landroid/widget/BaseAdapter;

    .line 67
    return-void
.end method

.method protected initViews(Landroid/view/LayoutInflater;)Landroid/view/View;
    .registers 11
    .param p1, "inflater"    # Landroid/view/LayoutInflater;

    .prologue
    const/4 v8, 0x2

    .line 71
    const v6, 0x7f03004d

    const/4 v7, 0x0

    invoke-virtual {p1, v6, v7}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v5

    .line 72
    .local v5, "view":Landroid/view/View;
    const v6, 0x7f0a0118

    invoke-virtual {v5, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;

    iput-object v6, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mPullToRefreshGridView:Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;

    .line 73
    iget-object v6, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mPullToRefreshGridView:Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;

    iput-object v6, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mPullToRefreshView:Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;

    .line 75
    iget-object v6, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mPullToRefreshGridView:Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;

    invoke-virtual {v6}, Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;->getRefreshableView()Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/GridView;

    .line 76
    .local v1, "gridView":Landroid/widget/GridView;
    invoke-virtual {v1, v8}, Landroid/widget/GridView;->setNumColumns(I)V

    .line 77
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f090034

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v2

    .line 78
    .local v2, "padding":I
    const/4 v6, 0x0

    invoke-virtual {v1, v2, v6, v2, v2}, Landroid/widget/GridView;->setPadding(IIII)V

    .line 80
    invoke-static {}, Lcom/zuiapps/suite/utils/device/DeviceUtil;->isMeizu()Z

    move-result v6

    if-nez v6, :cond_3b

    .line 81
    invoke-virtual {v1, v8}, Landroid/widget/GridView;->setOverScrollMode(I)V

    .line 84
    :cond_3b
    iget-object v6, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mPullToRefreshView:Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;

    iget-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mAdapter:Landroid/widget/BaseAdapter;

    invoke-virtual {v6, v7}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 86
    iget v6, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mType:I

    sget-object v7, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_User:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v7}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v7

    if-eq v6, v7, :cond_56

    iget v6, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mType:I

    sget-object v7, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_Fav:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v7}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v7

    if-ne v6, v7, :cond_75

    .line 88
    :cond_56
    const v6, 0x7f0a0049

    invoke-virtual {v5, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 89
    .local v0, "emptyView":Landroid/view/View;
    iget-object v6, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mPullToRefreshView:Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;

    invoke-virtual {v6, v0}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->setEmptyView(Landroid/view/View;)V

    .line 90
    const/16 v6, 0x8

    invoke-virtual {v0, v6}, Landroid/view/View;->setVisibility(I)V

    .line 91
    const v6, 0x7f0a00d9

    invoke-virtual {v0, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 93
    .local v3, "textView":Landroid/widget/TextView;
    const-string v4, "\u8fd9\u91cc\u4ec0\u4e48\u90fd\u6ca1\u6709"

    .line 94
    .local v4, "txt":Ljava/lang/String;
    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 97
    .end local v0    # "emptyView":Landroid/view/View;
    .end local v3    # "textView":Landroid/widget/TextView;
    .end local v4    # "txt":Ljava/lang/String;
    :cond_75
    return-object v5
.end method

.method public onPause()V
    .registers 2

    .prologue
    .line 59
    invoke-super {p0}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;->onPause()V

    .line 60
    const-string v0, "CommunityAppGridFragment"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageEnd(Ljava/lang/String;)V

    .line 61
    return-void
.end method

.method public onResume()V
    .registers 2

    .prologue
    .line 53
    invoke-super {p0}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;->onResume()V

    .line 54
    const-string v0, "CommunityAppGridFragment"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageStart(Ljava/lang/String;)V

    .line 55
    return-void
.end method

.method public scrollToHome()V
    .registers 4

    .prologue
    const/4 v2, 0x0

    .line 120
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityAppGridFragment;->mPullToRefreshGridView:Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;

    invoke-virtual {v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshGridView;->getRefreshableView()Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/GridView;

    .line 121
    .local v0, "gridView":Landroid/widget/GridView;
    invoke-virtual {v0, v2}, Landroid/widget/GridView;->setSelection(I)V

    .line 122
    invoke-virtual {v0, v2, v2}, Landroid/widget/GridView;->smoothScrollBy(II)V

    .line 123
    return-void
.end method
